<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设置续签时间')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" style="width: 800px;" id="form-domain-add" th:object="${sslDomain}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="row">
            <div class="col-xs-12">
                <div class="form-group" style="display: flex;">
                    <label class="control-label is-required" style="text-align: left;">续签到期时间：</label>
                    <div style="width: 500px;">
                        <input name="autoExpiredTime" th:value="${#dates.format(sslDomain.autoExpiredTime, 'yyyy-MM-dd')}" id="datetimepicker-demo-2" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="help-block m-b-none" style="color: red;"><i class="fa fa-info-circle"></i>如果到期了，该证书就停止自动续签、部署</span>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group" style="display: flex;">
                    <label class="control-label" style="text-align: left;">备注描述：</label>
                    <div style="width: 500px;">
                        <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-paper-plane"></i>完成配置</button>
                <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关闭配置</button>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "SSL/domain1"
    $("#form-apply-add").validate({
        focusCleanup: true
    });
    $("#datetimepicker-demo-2").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-domain-add").serializeArray();
            $.operate.saveTab(prefix + "/edit", data);
        }
    }
</script>
</body>
<style type="text/css">
    .inputDiv{border: solid 2px #E4E4E7;align-content: center; text-align: center; padding: 5px 18px;position: relative; border-radius: 5px; margin-right: 5px;}
    .sed{border-color: #12B980; color: #12B980;}
</style>
</html>
